// -----------------------------------------------------------------------------
// Generate By Furion Tools v1.6.0                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;

#nullable disable

namespace iemtm.WeChat.Core
{
    public partial class CollectorRepair : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<CollectorRepair, MasterDbContextLocator>
    {

        public int Id { get; set; }
        public string RepairCode { get; set; }
        public string DTUID { get; set; }
        public string GensetNum { get; set; }
        public string RepairContent { get; set; }
        public string RepairerCode { get; set; }
        public string RepairerName { get; set; }
        public string RepairerPhone { get; set; }
        public string AuditPersonCode { get; set; }
        public string AuditPersonName { get; set; }
        public string AuditRemarks { get; set; }
        public int? AuditState { get; set; }
        public DateTime? CreateTime { get; set; }
        public string PrjCode { get; set; }
        public DateTime? AuditTime { get; set; }
        public int? RepairCount { get; set; }
    
        public void Configure(EntityTypeBuilder<CollectorRepair> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.HasIndex(e => e.RepairCode, "Only_CollectorRepair")
                    .IsUnique();

                entityBuilder.Property(e => e.AuditPersonCode).HasMaxLength(100);

                entityBuilder.Property(e => e.AuditPersonName).HasMaxLength(100);

                entityBuilder.Property(e => e.AuditTime).HasColumnType("datetime");

                entityBuilder.Property(e => e.CreateTime).HasColumnType("datetime");

                entityBuilder.Property(e => e.DTUID).HasMaxLength(50);

                entityBuilder.Property(e => e.GensetNum).HasMaxLength(50);

                entityBuilder.Property(e => e.PrjCode).HasMaxLength(50);

                entityBuilder.Property(e => e.RepairCode).HasMaxLength(50);

                entityBuilder.Property(e => e.RepairContent).HasMaxLength(100);

                entityBuilder.Property(e => e.RepairerCode).HasMaxLength(100);

                entityBuilder.Property(e => e.RepairerName).HasMaxLength(100);

                entityBuilder.Property(e => e.RepairerPhone).HasMaxLength(13);
        }

    }
}

